import { cur_event_check } from '../../../../../../global_comps/Classes/cla_event_check';
import { forBindEventThis } from '../../../../../../global_comps/Func/forBindEventThis';
import { load_file_info_dataMana } from './cla_load_file_info_dataMana';
import type { load_file_info_props } from './cla_load_file_info_props';

const load_file_info_operateTag = 'load_file_info_operate';

export class load_file_info_operate extends load_file_info_dataMana {
  get [Symbol.toStringTag]() {
    return load_file_info_operateTag;
  }

  constructor(props: load_file_info_props) {
    super(props);

    forBindEventThis(this);

    this.eventM.addEventListen(
      this.dom_boder,
      'click',
      this.eventBind.border_click
    );
  }

  /**
   * 左键点击
   *
   * 显示 当前文件信息
   */
  border_click(event: MouseEvent) {
    if (cur_event_check.set_cur_event(event).left_click().result === false) {
      return;
    }

    this.show_file_info();
  }
}
